package cn.mxb.logic.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.mxb.floor.pagination.Result;
import cn.mxb.logic.dao.RoleDoDAO;
import cn.mxb.logic.entity.RoleDo;
import cn.mxb.logic.service.IRoleDoService;

@Service("roleDoService")
public class RoleDoServiceImpl  implements IRoleDoService {

	@Autowired
	private RoleDoDAO roleDoDAO;
	
	
	@Override
	public RoleDo findByProperty(String property, String value) {
		return roleDoDAO.findByProperty(property, value);
	}

	/**
	 * 分页
	 */
	@Override
	public Result<RoleDo> find(RoleDo roleDo, int page, int row) {
		return roleDoDAO.find(roleDo, page, row);
	}

	/**
	 * add
	 */
	@Override
	public RoleDo add(RoleDo roleDo) {
		return roleDoDAO.save(roleDo);
	}

	@Override
	public void delete(int id) {
		roleDoDAO.remove(RoleDo.class,id);
	}
	@Override
	public void update(RoleDo roleDo) {
		
	}
	
	@Override
	public List<RoleDo> findListByProperty(String property, String value) {
		return roleDoDAO.findListByProperty(property, value);
	}

	/**
	 * 查询全部
	 */
	@Override
	public List<RoleDo> findAllList() {
		return roleDoDAO.getAll(RoleDo.class);
	}


	
}
